﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMatrix.Model
{
    public class tblGlobalTestCasePassRate : INotifyPropertyChanged, INotifyPropertyChanging
    {

        public tblGlobalTestCasePassRate()
        {
           
        }

        public tblGlobalTestCasePassRate(
            int id
            , string Financialyear
            , string ProjectName
            , string PlanName
            , int Passed
            , int Failed
            , int NotExecuted
            , int Total
            , string PassPercent

            )
        {
            this.ID = id;
            this.Financialyear = Financialyear;
            this.ProjectName = ProjectName;
            this.PlanName = PlanName;
            this.Passed = Passed;
            this.Failed = Failed;
            this.NotExecuted = NotExecuted;
            this.Total = Total;
            this.PassPercent = PassPercent;
        }

        private int _ID;

        public int ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    NotifyPropertyChanging("ID");
                    _ID = value;
                    NotifyPropertyChanged("ID");
                }
            }

        }
        

        private string _Financialyear;

        public string Financialyear
        {
            get { return _Financialyear; }
            set
            {
                if (_Financialyear != value)
                {
                    NotifyPropertyChanging("Financialyear");
                    _Financialyear = value;
                    NotifyPropertyChanged("Financialyear");
                }
            }
        }

        private string _ProjectName;

        public string ProjectName
        {
            get { return _ProjectName; }
            set
            {
                if (_ProjectName != value)
                {
                    NotifyPropertyChanging("ProjectName");
                    _ProjectName = value;
                    NotifyPropertyChanged("ProjectName");
                }
            }
        }

        private string _PlanName;

        public string PlanName
        {
            get { return _PlanName; }
            set
            {
                if (_PlanName != value)
                {
                    NotifyPropertyChanging("PlanName");
                    _PlanName = value;
                    NotifyPropertyChanged("PlanName");
                }
            }
        }


        private int _Passed;

        public int Passed
        {
            get { return _Passed; }
            set
            {
                if (_Passed != value)
                {
                    NotifyPropertyChanging("Passed");
                    _Passed = value;
                    NotifyPropertyChanged("Passed");
                }
            }

        }

        private int _Failed;

        public int Failed
        {
            get { return _Failed; }
            set
            {
                if (_Failed != value)
                {
                    NotifyPropertyChanging("Failed");
                    _Failed = value;
                    NotifyPropertyChanged("Failed");
                }
            }

        }

        private int _NotExecuted;

        public int NotExecuted
        {
            get { return _NotExecuted; }
            set
            {
                if (_NotExecuted != value)
                {
                    NotifyPropertyChanging("NotExecuted");
                    _NotExecuted = value;
                    NotifyPropertyChanged("NotExecuted");
                }
            }

        }

        private int _Total;

        public int Total
        {
            get { return _Total; }
            set
            {
                if (_Total != value)
                {
                    NotifyPropertyChanging("Total");
                    _Total = value;
                    NotifyPropertyChanged("Total");
                }
            }

        }

        private string _PassPercent;

        public string PassPercent
        {
            get { return _PassPercent; }
            set
            {
                if (_PassPercent != value)
                {
                    NotifyPropertyChanging("PassPercent");
                    _PassPercent = value;
                    NotifyPropertyChanged("PassPercent");
                }
            }

        }

        public event PropertyChangedEventHandler PropertyChanged;

        // Used to notify that a property changed
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        // Used to notify that a property is about to change
        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }

        }
    }
}
